<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>AdminLTE 2 | Starter</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="/stylesheets/bootstrap.min.css">


  <link rel="stylesheet" href="/stylesheets/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="/stylesheets/skins/skin-blue.min.css">

  <!-- Ionicons -->
  <link rel="stylesheet" href="/stylesheets/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="/stylesheets/AdminLTE.min.css">
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<!--
BODY TAG OPTIONS:
=================
Apply one or more of the following classes to get the
desired effect
|---------------------------------------------------------|
| SKINS         | skin-blue                               |
|               | skin-black                              |
|               | skin-purple                             |
|               | skin-yellow                             |
|               | skin-red                                |
|               | skin-green                              |
|---------------------------------------------------------|
|LAYOUT OPTIONS | fixed                                   |
|               | layout-boxed                            |
|               | layout-top-nav                          |
|               | sidebar-collapse                        |
|               | sidebar-mini                            |
|---------------------------------------------------------|
-->

<body class="hold-transition skin-blue sidebar-mini">
  <div class="wrapper">

    <!-- Main Header -->
    <%- include("./header.ejs") %>

    <!-- Left side column. contains the logo and sidebar -->
    <%- include("./aside.ejs") %>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <section class="content-header">
        <h1>轮播图管理</h1>
      </section>
      <!-- Main content -->
      <section class="content container-fluid">
        <div class="box box-primary">
          <div class="box-header with-border">
            <h3 class="box-title">请输入轮播图信息</h3>
          </div>
          <!-- /.box-header -->
          <!-- form start -->
          <form role="form" action="/banner/addAction" method="POST" enctype="multipart/form-data">
            <div class="box-body">
              <div class="form-group">
                <label for="imgName">图片名称</label>
                <input type="text" class="form-control" id="imgName" name="imgName">
              </div>
              <div class="form-group">
                <label for="imgTitle">图片描述</label>
                <input type="text" class="form-control" id="imgTitle" name="imgTitle">
              </div>
              <div class="form-group">
                <label for="imgFile">请选择图片</label>
                <input type="file" id="imgFile" name="imgFile">
              </div>
            </div>
            <!-- /.box-body -->
            <div class="box-footer">
              <button type="submit" class="btn btn-primary">上传</button>
            </div>
          </form>
        </div>

        <div class="box">
          <div class="box-header">
            <h3 class="box-title">已上传图片</h3>
          </div>
          <!-- /.box-header -->
          <div class="box-body no-padding">
            <table class="table table-condensed">
              <tbody>
                <tr>
                  <th style="width: 40px">序号</th>
                  <th style="width: 100px">图片</th>
                  <th>图片名称</th>
                  <th style="width: 400px">图片描述</th>
                  <th style="width: 50px">操作</th>
                </tr>
                <% for(var i=0;i<data.length;i++){ %>
                  <tr>
                    <td><%= i+1 %></td>
                    <td><img width="100" src="<%= data[i].src %>" alt=""></td>
                    <td><%= data[i].name %></td>
                    <td><%= data[i].title %></td>
                    <td>
                      <a href="/banner/del?id=<%= data[i].bannerId %>">删除</a>
                    </td>
                  </tr>
                <% } %>
              </tbody>
            </table>
          </div>
          <!-- /.box-body -->
        </div>
      </section>
      <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <!-- Main Footer -->
    <%- include("./footer.ejs") %>

  </div>
  <!-- ./wrapper -->

  <!-- jQuery 3 -->
  <script src="/javascripts/jquery.min.js"></script>
  <!-- Bootstrap 3.3.7 -->
  <script src="/javascripts/bootstrap.min.js"></script>
  <!-- AdminLTE App -->
  <script src="/javascripts/adminlte.min.js"></script>

</body>

</html>